Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Use Kibana Authz for API authorization #205335

Merged
merged 34 commits into from
Jan 6, 2025

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Dec 31, 2024

Summary

Resolve #203170

Use Kibana authz instead of having custom logic for Fleet when it's possible. This add the required privileges to the generated open API doc.

Privileges are tested with API integration tests, so I do not think we will introduce a regression or a breaking change with that PR.

It was not possible to migrate all routes as some scenario are not yet supported like a route need (privilege1 AND privilege2) OR (privilege3 AND privilege 4) @legrego do you think it will be possible to support this kind of rules? do you want me to create an issue for that.

Screenshot 2025-01-03 at 8 57 21 AM

Do we want to backport this to 8.x?

nchaulet and others added 11 commits December 31, 2024 10:53
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@nchaulet nchaulet marked this pull request as ready for review January 2, 2025 17:48
@nchaulet nchaulet requested a review from a team as a code owner January 2, 2025 17:48
@nchaulet nchaulet marked this pull request as draft January 2, 2025 17:48
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Jan 2, 2025
nchaulet and others added 7 commits January 2, 2025 14:01
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@nchaulet nchaulet self-assigned this Jan 3, 2025
@nchaulet nchaulet added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 3, 2025
@nchaulet nchaulet marked this pull request as ready for review January 3, 2025 14:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@legrego
Copy link
Member

legrego commented Jan 3, 2025

It was not possible to migrate all routes as some scenario are not yet supported like a route need (privilege1 AND privilege2) OR (privilege3 AND privilege 4) @legrego do you think it will be possible to support this kind of rules? do you want me to create an issue for that.

@elena-shostak what do you think about this request?

…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@juliaElastic
Copy link
Contributor

Do we want to backport this to 8.x?

Probably not, the previous response schema changes are not backported, we would get a lot of conflicts in backport.

@nchaulet
Copy link
Member Author

nchaulet commented Jan 3, 2025

@elasticmachine merge upstream

@nchaulet nchaulet requested a review from juliaElastic January 3, 2025 15:41
Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nchaulet and others added 8 commits January 3, 2025 10:54
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@nchaulet
Copy link
Member Author

nchaulet commented Jan 6, 2025

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [211d4a6]

History

cc @nchaulet

@nchaulet
Copy link
Member Author

nchaulet commented Jan 6, 2025

@elasticmachine merge upstream

@nchaulet nchaulet merged commit 0b8ae36 into elastic:main Jan 6, 2025
9 checks passed
@nchaulet nchaulet deleted the feature-kibana-authz branch January 6, 2025 19:41
kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jan 7, 2025
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Convert Fleet roles/permissions to new Kibana authz framework
5 participants